<?php

/*
 * Fresns Control Panel (Standalone)
 * Copyright (C) 2021-Present 刘鑫
 * Released under the MIT License.
 */

namespace App\Plugins\FcpApi\TweetAdmin;

use App\Helpers\StrHelper;

class FsResourceDetail extends AdminResource
{
    public function toArray($request)
    {
        $parentResult = parent::toArray($request);

        $selfResult = [
            'coin'  => $this->coin,
            'remark'    => $this->remark,
            'gender'    => $this->gender,
            'birthday'    => $this->birthday,
            'qr_code_url' => $this->qr_code_url,
            'more_json'   => $this->more_json,
            'more_json_decode' => json_decode($this->more_json, true),
            'phone_desc'=> StrHelper::createPhone($this->phone),

        ];

        $result = array_merge($parentResult, $selfResult);

        return $result;
    }
}
